home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 February / CHIPCD_02_2002.iso / Internet / Macromedia ColdFusion Server 5 / coldfusion-50-win-us.exe / data1.cab / Examples / CFDOCS / snippets / lsparseeurocurrency.cfm < prev    next >
Encoding:
Text File  |  2001-06-13  |  956 b   |  31 lines

  1. <!--- This example shows LSParseEuroCurrency --->
  2. <HTML>
  3. <HEAD>
  4. <TITLE>LSParseEuroCurrency Example</TITLE>
  5. </HEAD>
  6.  
  7. <BASEFONT FACE="Arial, Helvetica" SIZE=2>
  8. <BODY  bgcolor="#FFFFD5">
  9. <H3>LSParseEuroCurrency Example</H3>
  10.  
  11. <P>LSParseEuroCurrency converts a local-specific currency
  12. string to a number.  Attempts conversion through each of
  13. the three default currency formats.
  14.  
  15. <!--- loop through a list of possible locales and
  16. show currency values for 123,456 units --->
  17. <CFLOOP LIST="#Server.Coldfusion.SupportedLocales#"
  18. INDEX="locale" DELIMITERS=",">
  19.     <CFSET oldlocale = SetLocale(locale)>
  20.     <CFOUTPUT><P><B><I>#locale#</I></B><BR>
  21.         Local: #LSEuroCurrencyFormat(123456, "local")#<BR>
  22.         Currency Number: 
  23.         #LSParseEuroCurrency("EUR123456")#<BR>
  24.         International: #LSEuroCurrencyFormat(123456, "international")#<BR>
  25.         None: #LSEuroCurrencyFormat(123456, "none")#<BR>
  26.         <Hr noshade>
  27.     </CFOUTPUT>
  28. </CFLOOP>
  29.  
  30. </BODY>
  31. </HTML>